/**
 * FormSobre.java
 * Copyright (C) 2009 Jose Mauro da Silva Sandy
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/*
 * FormSobre.java
 *
 * Created on 11/07/2009, 17:13:58
 */

package frames;

import java.io.File;
import java.io.IOException;

/**
 *
 * @author jmsandy
 */
public class FormSobre extends javax.swing.JDialog {

    /** Creates new form FormSobre */
    public FormSobre() {
        initComponents();
        try {
            lbDiretorioDesc.setText(new File(".").getCanonicalPath());
            lbSistemaDesc.setText(System.getProperty("os.name") + " - " +
                        System.getProperty("os.version"));
        } catch (IOException ex) {  }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panelPrinc = new javax.swing.JPanel();
        panelTitle = new javax.swing.JPanel();
        lbSigla = new org.jdesktop.swingx.JXLabel();
        btnImage = new javax.swing.JButton();
        lbDescricao = new javax.swing.JLabel();
        lbLicenca = new javax.swing.JLabel();
        lbVersao = new javax.swing.JLabel();
        lbDiretorio = new javax.swing.JLabel();
        lbSistema = new javax.swing.JLabel();
        lbVersaoDesc = new javax.swing.JLabel();
        lbDiretorioDesc = new javax.swing.JLabel();
        lbSistemaDesc = new javax.swing.JLabel();
        panelTitle1 = new javax.swing.JPanel();
        btnOk = new javax.swing.JButton();
        lbAutor = new javax.swing.JLabel();
        lbEmail = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Sobre");
        setName("formSobre"); // NOI18N
        setResizable(false);

        org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder1 = new org.jdesktop.swingx.border.DropShadowBorder();
        dropShadowBorder1.setShowLeftShadow(true);
        dropShadowBorder1.setShowTopShadow(true);
        panelPrinc.setBorder(dropShadowBorder1);

        panelTitle.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        panelTitle.setPreferredSize(new java.awt.Dimension(510, 60));

        lbSigla.setForeground(java.awt.Color.red);
        lbSigla.setText("SCGCC");
        lbSigla.setFont(new java.awt.Font("Monospaced", 1, 12)); // NOI18N

        btnImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logoRel.png"))); // NOI18N
        btnImage.setAlignmentY(0   );
        btnImage.setBorderPainted(false);
        btnImage.setContentAreaFilled(false);
        btnImage.setFocusPainted(false);
        btnImage.setFocusable(false);
        btnImage.setMaximumSize(new java.awt.Dimension(60, 60));
        btnImage.setMinimumSize(new java.awt.Dimension(60, 60));
        btnImage.setPreferredSize(new java.awt.Dimension(60, 60));
        btnImage.setRequestFocusEnabled(false);
        btnImage.setRolloverEnabled(false);

        lbDescricao.setFont(new java.awt.Font("Monospaced", 1, 12)); // NOI18N
        lbDescricao.setText("- Sistema Gerenciador de Gastos de Construção Civil");

        javax.swing.GroupLayout panelTitleLayout = new javax.swing.GroupLayout(panelTitle);
        panelTitle.setLayout(panelTitleLayout);
        panelTitleLayout.setHorizontalGroup(
            panelTitleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTitleLayout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addComponent(btnImage, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lbSigla, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lbDescricao)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelTitleLayout.setVerticalGroup(
            panelTitleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTitleLayout.createSequentialGroup()
                .addGroup(panelTitleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnImage, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(panelTitleLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(panelTitleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbSigla, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbDescricao))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        lbLicenca.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N
        lbLicenca.setText("Este produto está licenciado sobre a Licença GPL.");

        lbVersao.setFont(new java.awt.Font("Monospaced", 1, 12)); // NOI18N
        lbVersao.setText("Versão:");

        lbDiretorio.setFont(new java.awt.Font("Monospaced", 1, 12)); // NOI18N
        lbDiretorio.setText("Diretório:");

        lbSistema.setFont(new java.awt.Font("Monospaced", 1, 12)); // NOI18N
        lbSistema.setText("Sistema:");

        lbVersaoDesc.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N
        lbVersaoDesc.setText("0.1");

        lbDiretorioDesc.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N

        lbSistemaDesc.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N

        panelTitle1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        panelTitle1.setPreferredSize(new java.awt.Dimension(510, 60));

        btnOk.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ok.png"))); // NOI18N
        btnOk.setText("OK");
        btnOk.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnOkMouseClicked(evt);
            }
        });

        lbAutor.setFont(new java.awt.Font("Monospaced", 1, 12)); // NOI18N
        lbAutor.setText("José Mauro da Silva Sandy");

        lbEmail.setFont(new java.awt.Font("Monospaced", 1, 12)); // NOI18N
        lbEmail.setText("jmsandy@gmail.com");

        javax.swing.GroupLayout panelTitle1Layout = new javax.swing.GroupLayout(panelTitle1);
        panelTitle1.setLayout(panelTitle1Layout);
        panelTitle1Layout.setHorizontalGroup(
            panelTitle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTitle1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelTitle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbAutor)
                    .addComponent(lbEmail))
                .addGap(104, 104, 104)
                .addComponent(btnOk, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(70, 70, 70))
        );
        panelTitle1Layout.setVerticalGroup(
            panelTitle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelTitle1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelTitle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnOk)
                    .addGroup(panelTitle1Layout.createSequentialGroup()
                        .addComponent(lbAutor)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lbEmail)))
                .addContainerGap())
        );

        javax.swing.GroupLayout panelPrincLayout = new javax.swing.GroupLayout(panelPrinc);
        panelPrinc.setLayout(panelPrincLayout);
        panelPrincLayout.setHorizontalGroup(
            panelPrincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelPrincLayout.createSequentialGroup()
                .addGroup(panelPrincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelPrincLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(panelTitle1, javax.swing.GroupLayout.PREFERRED_SIZE, 492, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(panelPrincLayout.createSequentialGroup()
                        .addGap(86, 86, 86)
                        .addComponent(lbLicenca))
                    .addGroup(panelPrincLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(panelPrincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbVersao)
                            .addComponent(lbDiretorio)
                            .addComponent(lbSistema))
                        .addGap(12, 12, 12)
                        .addGroup(panelPrincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbSistemaDesc, javax.swing.GroupLayout.PREFERRED_SIZE, 393, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lbVersaoDesc)
                            .addComponent(lbDiretorioDesc, javax.swing.GroupLayout.PREFERRED_SIZE, 405, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(panelPrincLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(panelTitle, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE)))
                .addContainerGap())
        );
        panelPrincLayout.setVerticalGroup(
            panelPrincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelPrincLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(panelTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lbLicenca)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelPrincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbVersao)
                    .addComponent(lbVersaoDesc))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelPrincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbDiretorio)
                    .addComponent(lbDiretorioDesc))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelPrincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbSistema)
                    .addComponent(lbSistemaDesc))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelTitle1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelPrinc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelPrinc, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-536)/2, (screenSize.height-273)/2, 536, 273);
    }// </editor-fold>//GEN-END:initComponents

    private void btnOkMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnOkMouseClicked
        dispose();
    }//GEN-LAST:event_btnOkMouseClicked

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FormSobre().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnImage;
    private javax.swing.JButton btnOk;
    private javax.swing.JLabel lbAutor;
    private javax.swing.JLabel lbDescricao;
    private javax.swing.JLabel lbDiretorio;
    private javax.swing.JLabel lbDiretorioDesc;
    private javax.swing.JLabel lbEmail;
    private javax.swing.JLabel lbLicenca;
    private org.jdesktop.swingx.JXLabel lbSigla;
    private javax.swing.JLabel lbSistema;
    private javax.swing.JLabel lbSistemaDesc;
    private javax.swing.JLabel lbVersao;
    private javax.swing.JLabel lbVersaoDesc;
    private javax.swing.JPanel panelPrinc;
    private javax.swing.JPanel panelTitle;
    private javax.swing.JPanel panelTitle1;
    // End of variables declaration//GEN-END:variables

}
